<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script src="../js/global.js"></script>
<script src="https://code.highcharts.com.cn/highcharts/highcharts.js"></script>
<script src="https://code.highcharts.com.cn/highcharts/modules/exporting.js"></script>
<script src="https://code.highcharts.com.cn/highcharts/modules/series-label.js"></script>
<script src="https://code.highcharts.com.cn/highcharts/modules/oldie.js"></script>
<script src="https://code.highcharts.com.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
</head>
<body>
<div id="container2" style="max-width:700px;height:400px"></div>
						  <script>
					         $.ajax({
					         	url:'wangluotongjitubing',
					             type:'post',
					             dataType:"json",
					             success:function(res) {
					            	 
					            	 Highcharts.chart('container2', {
					             		chart: {
					             				plotBackgroundColor: null,
					             				plotBorderWidth: null,
					             				plotShadow: false,
					             				type: 'pie'
					             		},
					             		title: {
					             				text: '所有学生是否分配比例图'
					             		},
					             		tooltip: {
					             				pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
					             		},
					             		plotOptions: {
					             				pie: {
					             						allowPointSelect: true,
					             						cursor: 'pointer',
					             						dataLabels: {
					             								enabled: true,
					             								format: '<b>{point.name}</b>: {point.percentage:.1f} %',
					             								style: {
					             										color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
					             								}
					             						}
					             				}
					             		},
					             		series: [{
					             				name: '比例',
					             				colorByPoint: true,
					             				data: res.data
					             		}]
					             });
					             }
					         })
			        </script>
</body>
</html>